package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.Reservation;
import com.zzyl.entity.TimeCount;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface ReservationMapper {

    void addReservation(Reservation reservation);

    Page<Reservation> getByPage(Integer status);

    void cancel(Long id);

    Integer getCancelledReservationCount();


    List<TimeCount> getCountByTimeCount(LocalDateTime time, LocalDateTime endTime);

    void updateReservationStatus(LocalDateTime timeNow);
}
